import request from '@/utils/request'

// 创建应急部门
export function createEmergencyReservePlainDept(data) {
  return request({
    url: '/biz/emergency-reserve-plain-dept/create',
    method: 'post',
    data: data
  })
}

// 更新应急部门
export function updateEmergencyReservePlainDept(data) {
  return request({
    url: '/biz/emergency-reserve-plain-dept/update',
    method: 'put',
    data: data
  })
}

// 删除应急部门
export function deleteEmergencyReservePlainDept(id) {
  return request({
    url: '/biz/emergency-reserve-plain-dept/delete?id=' + id,
    method: 'delete'
  })
}

// 获得应急部门
export function getEmergencyReservePlainDept(id) {
  return request({
    url: '/biz/emergency-reserve-plain-dept/get?id=' + id,
    method: 'get'
  })
}

// 获得应急部门分页
export function getEmergencyReservePlainDeptPage(query) {
  return request({
    url: '/biz/emergency-reserve-plain-dept/page',
    method: 'get',
    params: query
  })
}

// 导出应急部门 Excel
export function exportEmergencyReservePlainDeptExcel(query) {
  return request({
    url: '/biz/emergency-reserve-plain-dept/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}

// 获得应急部门所有数据
export function getEmergencyReservePlainDeptListAll() {
  return request({
    url: '/biz/emergency-reserve-plain-dept/list/all',
    method: 'get'
  })
}
